package com.xyht.medicine_management_system.auth.controller;

import com.xyht.medicine_management_system.auth.service.AuthService;
import com.xyht.medicine_management_system.common.commonReturn.ResponseResult;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/auth")
public class AuthController {
    @Autowired
    private AuthService authService;

    @ApiModelProperty(value = "是否有界面访问权限")
    @GetMapping("/isAppPermission")
    public ResponseResult isAppPermission (@RequestParam("requestPath") String requestPath, HttpServletRequest request) {
        return authService.isAppPermission(requestPath,request);
    }
}
